home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 22 / PC Actual CD 22.iso / linux / xfree86 / DOC / OS2.Notes < prev    next >
Encoding:
Text File  |  1998-01-07  |  8.8 KB  |  463 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.          Notes on Rebuilding XFree86/OS2 from Scratch
  11.  
  12.                   Holger Veit
  13.  
  14.                Last modified 17 May 1997
  15.  
  16.  
  17.  
  18. 1.  Preface
  19.  
  20. X11 and XFree86 were initially developed on Unix-based systems. Usually Unix
  21. systems provide a rich number of tools and utilities to get certain things
  22. done. Under OS/2, these tools are not installed, but ports are available which
  23. are sometimes functionally equivalent to Unix utilities with the same name, but
  24. also differ sometimes in a subtle way.    This guide will give you hints if you
  25. intend to rebuild the system from scratch under OS/2.
  26.  
  27. Please also read README.OS2 for end-user information, and set at least the
  28. environment variables described there.
  29.  
  30. At the current time, the most recent version available is XFree86-3.3.    This is
  31. a full and unrestricted version which comes with complete source code. 3.3 is
  32. an intermediate version which was released because the last beta version (3.2A)
  33. was about to expire and the new 4.0 version was not completely finished in
  34. time. 3.3 is the last ``classical'' version which has separate Xservers for
  35. different video cards.
  36.  
  37. If you want to join the XFree86 developer team, e.g. to add support for certain
  38. hardware, please send a request to BOD@XFree86.org. Please think about such a
  39. step carefully before, though, since much work is involved. Please use the
  40. XFree86-3.3 source code as a test example how to compile the system. The abil-
  41. ity to manage that is a basic requirement for becoming a developer.
  42.  
  43.  
  44. 2.  Tools required
  45.  
  46. I have tried to reduce the number of external tools, but when looking back it
  47. seems I were not very successful. At least I managed to get everything working
  48. with the native CMD.EXE shell only. However, there is still plenty of software
  49. required.  Most of this software is available from hobbes.nmsu.edu or
  50. ftp.leo.org via anonymous FTP. The following shopping list shows what you will
  51. need:
  52.  
  53.    o gcc  EMX/gcc emx 0.9C patch2 or later
  54.  
  55.    o gzip GNU zip/unzip
  56.  
  57.    o tar  GNU tar
  58.  
  59.    o patch     Larry Wall's patch utility (attention: incompatible tool with
  60.      same name in OS/2)
  61.  
  62.  
  63.  
  64. Notes on Rebuilding XFree86/OS2 from Scratch
  65.  
  66.  
  67.  
  68.  
  69.  
  70. Notes on Rebuilding XFree86/OS2 from Scratch
  71.  
  72.  
  73.  
  74.    o install   BSD/GNU install
  75.  
  76.    o rm,mv,cp  GNU file utilities
  77.  
  78.    o tee,..    GNU shell utilities
  79.  
  80.    o groff     GNU nroff/troff
  81.  
  82.    o sed  GNU sed stream editor
  83.  
  84.    o grep GNU grep
  85.  
  86.    o gawk GNU awk
  87.  
  88.    o make GNU make 3.71/3.72 (use the one coming with XFree86!)
  89.  
  90.    o flex GNU flex
  91.  
  92.    o bison     GNU bison
  93.  
  94.    o find GNU find    (attention: incompatible tool with the same name in OS/2)
  95.  
  96. If there is no version number given, any new version will do. Particularly
  97. critical is only EMX/gcc and GNU make. Note that the second GCC implementation
  98. which might still be available from some archives is NOT compatible.
  99.  
  100. Furthermore, you need the XFree86 sources. These are available from the common
  101. XFree86 repositories. Look into a directory which is often named
  102. /pub/XFree86/3.3/source.
  103.  
  104.  
  105. 3.  Compiling and Installing
  106.  
  107. You need about 300MB of free HPFS space for the whole system. This does not
  108. include space for the postscript and troff documentation files. I have never
  109. installed them. Nor did I install the test subtree.
  110.  
  111.   1.  Install all the above utilities. Refer to the corresponding documenta-
  112.       tion.  Verify that everything works well, particularly EMX.
  113.  
  114.   2.  It is a good idea to use the same or a similar structure I have.    I have
  115.       made a directory \x11 on the partition for compiling and have put every-
  116.       thing below this tree. I found that a clean tree occupies less than the
  117.       half space of the disk, this gives me the opportunity to rename this tree
  118.       to \x11old and copy a new version to the same disk to produce diffs. Last
  119.       time the complete tree was arranged under the root directory xc, this
  120.       would become \x11\xc then.
  121.  
  122.   3.  To unpack the files you would usually execute the command
  123.  
  124.        gzip -dc file.tar.gz | tar xvf -
  125.  
  126.  
  127.       in the \x11 directory. At the end you will usually see the irritating,
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. Notes on Rebuilding XFree86/OS2 from Scratch
  137.  
  138.  
  139.  
  140.       but non-fatal message "gzip: stdout Broken pipe". Ignore it.
  141.  
  142.   4.  After that, is is likely necessary to apply some patches, either from the
  143.       XConsortium or from the XFree86 project. Before you do this, enter
  144.  
  145.          chmod -R a+rw \x11\xc
  146.  
  147.  
  148.  
  149.       to make certain files in the tree writable.
  150.  
  151.   5.  There should be a file added-XXX accompanying the patch file which lists
  152.       the files that are newly created. The patch program has a problem with
  153.       creating new directories, so we need to create them on advance. For each
  154.       added-XXX file you find, execute from \x11
  155.  
  156.        xc\config\util\added added-XXX
  157.  
  158.  
  159.       If there is no added-XXX file available, you can make one with the fol-
  160.       lowing instructions:
  161.  
  162.          grep "\*\*\* xc/" patchfile >added-file
  163.  
  164.  
  165.  
  166.       Edit added-file with a text editor and remove the ***  at the beginning
  167.       and the time stamp at the end (search for a TAB and erase to the end of
  168.       the line). You get a list of file paths, one in a line, which is the
  169.       input to the added utility.
  170.  
  171.   6.  After that you can apply the patches in the right order. Usually this is
  172.       done by a command
  173.  
  174.          patch -p -E <patchfile 2>&1 | tee patchlog
  175.  
  176.  
  177.  
  178.       from the \x11 directory. Be aware to use the right patch - OS/2 has a
  179.       utility with the same name and different functionality.  Don't use the
  180.       recommended -s option, this makes patch quiet, and you won't see problems
  181.       in the patchlog file. Use
  182.  
  183.          find \x11 -name *.rej -print
  184.          find \x11 -name *# -print
  185.  
  186.  
  187.  
  188.       to find any rejects and unapplied patches (attention: yet another OS/2
  189.       program with wrong functionality). Normally there shouldn't be any prob-
  190.       lems of this kind, else you have made a mistake. Finally remove the orig-
  191.       inal files with
  192.  
  193.          find \x11 -name *.orig -print -exec rm {} ;
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. Notes on Rebuilding XFree86/OS2 from Scratch
  203.  
  204.  
  205.  
  206.   7.  Go to the xc/config/cf directory and edit the xf86site.def file to match
  207.       your requirements (you probably don't want to compile all X servers).
  208.       Certain changes must be set to the following values:
  209.  
  210.      o Disable if not already done any PC98 server; PC98 (Japanese XFree86)
  211.        does not work yet. Porters from Japan are welcome!
  212.  
  213.      o #define WacomSupport        NO #define ElographicsSupport
  214.        NO Both options are not yet supported.
  215.  
  216.      o Tcl* and Tk* don't need to be set explicitly. Reasonable defaults
  217.        are in the other config files, provided you have a complete
  218.        XFree86/OS2 binary tree with the tcl/tk runtime support installed.
  219.  
  220.      o #define BuildDynamicLoading     NO This does not work.
  221.  
  222.   8.  Go to the directory xc\util\compress and make compress.exe there. Install
  223.       the program produced there in your path. I stumbled more than once on
  224.       half-ported compress programs on OS/2 ftp servers that are defective
  225.       w.r.t.  reading and writing stdin/stdout. In some stage (font compres-
  226.       sion) otherwise you will get a core dump of mkfontdir, because all com-
  227.       pressed fonts are corrupt.
  228.  
  229.   9.  Set the environment variable X11ROOT to something different than it is;
  230.       otherwise the installation process will overwrite your original
  231.       XFree86/OS2 installation. If you have not set this variable, go back to
  232.       the prefix section of this document: you have forgotten something.
  233.  
  234.  10.  Copy the file xc/config/util/buildos2.cmd into the xc directory. If this
  235.       is a second or later attempt, you might need to copy the saved toplevel
  236.       Makefile.os2 back to Makefile.
  237.  
  238.  11.  Execute this buildos2.cmd command in the xc directory; it will produce a
  239.       logfile buildxc.log in this directory.
  240.  
  241.  12.  Go have a bucket of coffee, or better, buy new coffee - in Colombia!  The
  242.       compile will need between 2 and 20 hours, depending on your selections,
  243.       and the horse power of your hardware.
  244.  
  245.  13.  When finished, view the logfile for errors, and fix the problems if there
  246.       are some. I have managed to compile the whole system flawlessly, so there
  247.       is at least one configuration that works.
  248.  
  249.  14.  Finally, from the xc dir, execute
  250.  
  251.          xmake install
  252.          xmake install.man
  253.  
  254.  
  255. Well, you see, this was quite easy :-)
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. Notes on Rebuilding XFree86/OS2 from Scratch
  269.  
  270.  
  271.  
  272.      Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/OS2note.sgml,v 3.4.2.2 1997/05/24 08:36:06 dawes Exp $
  273.  
  274.  
  275.  
  276.  
  277.  
  278.      $XConsortium: OS2note.sgml /main/1 1996/02/24 10:08:59 kaleb $
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. Notes on Rebuilding XFree86/OS2 from Scratch
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.                    CONTENTS
  405.  
  406.  
  407.  
  408. 1. Preface .................................................................. 1
  409.  
  410. 2. Tools required ........................................................... 1
  411.  
  412. 3. Compiling and Installing ................................................. 2
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.                        i
  461.  
  462.  
  463.